package com.example.moments.ssmemo.entity;

import java.util.ArrayList;
import java.util.List;

public class LinkData {
    String url;
//    int liking;
    int linkimg;
    String linktitle;

    public static LinkData toMe(Link link) {
//        LikeData likeData=new LikeData();
        LinkData linkData=new LinkData();
//        likeData.setUsername(link.getUsername());
        linkData.setLinkimg(link.getLinkImg());
        linkData.setLinktitle(link.getLinkTitle());
        linkData.setUrl(link.getUrl());
//        linkData.se(link.getUrl());
//        likeData.setUsername();
        return linkData;
//        return new CommentData(comment.getUsername(), comment.getContent(), comment.getReplyUsername());
//     return   new CommentData(comment.getUsername(),comment.getContent(),comment.getReplyUsername());
//        comment.getId()
    }


    public static List<LinkData> toMe(List<Link> likes) {
        List<LinkData> list = new ArrayList<>();
        for (Link link : likes) {
            list.add(toMe(link));
        }
        return list;

    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getLinkimg() {
        return linkimg;
    }

    public void setLinkimg(int linkimg) {
        this.linkimg = linkimg;
    }

    public String getLinktitle() {
        return linktitle;
    }

    public void setLinktitle(String linktitle) {
        this.linktitle = linktitle;
    }
}
